#include "vector.h"

void test1()
{
	txp::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(5);
	v1.push_back(2);

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	auto it = v1.begin();
	while (it != v1.end())
	{
		if (*it % 2 == 0)
		{
			it = v1.erase(it);
		}
		else
		{
			++it;
		}
	}

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;
}

int main()
{
	test1();

	return 0;
}

void test4()
{
	txp::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(5);
	v1.push_back(2);

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	auto it = v1.begin();
	while (it != v1.end())
	{
		if (*it % 2 == 0)
		{
			it = v1.erase(it);
		}
		else
		{
			++it;
		}
	}

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;
}


int main2()
{
	string s1 = "abcdef";
	txp::vector<int> v1(s1.begin(), s1.end());
	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	return 0;
}


int main1()
{
	txp::vector<string> v1;
	v1.push_back("11111111");
	v1.push_back("11111111");
	v1.push_back("11111111");
	v1.push_back("11111111");
	v1.push_back("11111111");

	for (auto& e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	return 0;
}